package com.juicygames.undoer.ballcounter;

import com.juicygames.framework.draw.DrawDepth;
import com.juicygames.framework.draw.DrawService;
import com.juicygames.framework.draw.TextDisplay;
import com.juicygames.framework.gamepart.GamePart;
import com.juicygames.undoer.ballcounter.UpdateHandler;

public class BallCounter extends GamePart {
	
	public BallCounter(GamePart parent) {
		super(parent);
		
		TextDisplay textDisplay = addHandler(new TextDisplay(this));
		textDisplay.setX(5);
		textDisplay.setY(30);

		addPart(new DrawDepth(this,1));
		getWorld().getPart(DrawService.class).register(textDisplay);
		
		groundHandler(addHandler(new UpdateHandler(this)));
	}

}
